/**
 * Creater with IntelliJ IDEA.
 * Description:
 * User: 86152
 * Dae: 2022-07-23
 * Time: 19:36
 */
public class demo1 {
    public static void main(String[] args) throws InterruptedException {
        for(int i=0;i<20;i++) {
            int j=i;
            Thread t= new Thread(new Runnable() {
                @Override
                public void run() {
                    System.out.println(j);
                }
            });
            t.start();
            t.join();
        }
        System.out.println("ok");
    }
}
